#include <cairo.h>
int main()
{
    cairo_surface_t* surface = cairo_image_surface_create(CAIRO_FORMAT_ARGB32, 400, 400);
    cairo_t* cr = cairo_create(surface);
    cairo_text_extents_t te;
    cairo_set_source_rgb (cr, 0.0, 222.0, 222.0);
    cairo_select_font_face (cr, "Georgia",
    CAIRO_FONT_SLANT_NORMAL, CAIRO_FONT_WEIGHT_BOLD);
    cairo_set_font_size (cr, 200);
    cairo_text_extents (cr, "a", &te);
    cairo_move_to (cr, 200 - te.width / 2 - te.x_bearing,
                   200 - te.height / 2 - te.y_bearing);
    cairo_show_text (cr, "a");
    cairo_destroy(cr);
    cairo_surface_write_to_png(surface, "testcairo.png");
    
}

